package com.silverhaze.diamond.client.ui.dialogs;

import com.silverhaze.diamond.client.resources.ServiceResourceContainer;
import com.silverhaze.diamond.client.ui.panel.AboutPanel;

import java.awt.*;

/**
 * © Ivan Babanin (14.07.2007 14:37:19)
 * Project Galaxy. This part of code is strictly confidential.
 */
public class AboutDialog extends AbstractDialog {
    private static AboutDialog aboutDlg;

    public AboutDialog(Frame owner) {
        super(owner, true);
    }

    protected void init(DialogButtonView viewType) {
        setUndecorated(true);
        super.init(viewType);

        AboutPanel aboutPanel = new AboutPanel(ServiceResourceContainer.SPLASH_SCREEN, this);
        add(aboutPanel);

        setSize(aboutPanel.getSize());
    }

    protected void okPressed() {
    }

    public static void showDialog() {
        if (aboutDlg == null) {
            aboutDlg = new AboutDialog(null);
        }

        aboutDlg.setVisible(true);
    }
}


